﻿
@{
    ViewBag.Title = "Index";
    Layout = "~/Areas/Wap/Views/Shared/_Layout.cshtml";
}
<link href="/Areas/Wap/Content/Home.css" rel="stylesheet" />
@using YTCMS.Core;
@model IQueryable<YTCMS.Domain.Entities.cmscolumn>

<div id="wrap" class="clearfix overflow mg-auto">
    <div class="i-head mg-auto overflow area border-bom">
        <h1>西藏
            <span>集结号</span>
        </h1>
    </div>
    <!--轮播图广告--->
    <div class="swiper-container overflow" >
        <div class="swiper-wrapper" id="swiper-wrapper">
            <ul id="carousel" class="carousel">
                @Html.Action("Index", "Ads", new {@code = "WAPHomeAds" })
            </ul>
            <div id="pager" class="pager"></div>
        </div>
        <div class="pagination"></div>
    </div>
    <!--地区-->
    <div class="address">
        <div class="address_top">
            <ul>
                <li>
                    <div>
                        <a href="/wap/Products/Index?cid=4"><img src="/Areas/Wap/Content/img/ls.png" /></a>
                    </div>
                    <span>
                        <a href="/wap/Products/Index?cid=4">拉萨地区</a>
                    </span>
                </li>
                <li>
                    <div>
                        <a href="/wap/Products/Index?cid=6"><img src="/Areas/Wap/Content/img/lz.png" /></a>
</div>
                    <span>
                        <a href="/wap/Products/Index?cid=6">林芝地区</a>
                    </span>
                </li>
                <li>
                    <div>
                        <a href="/wap/Products/Index?cid=3"><img src="/Areas/Wap/Content/img/rkz.png" /></a>
</div>
                    <span>
                        <a href="/wap/Products/Index?cid=3">日喀则地区</a>
                    </span>
                </li>
                <li>
                    <div>
                        <a href="/wap/Products/Index?cid=5"><img src="/Areas/Wap/Content/img/sn.png" /></a>
</div>
                    <span>
                        <a href="/wap/Products/Index?cid=5">山南地区</a>
                    </span>
                </li>
                <li>
                    <div>
                        <a href="/wap/Products/Index?cid=1"><img src="/Areas/Wap/Content/img/al.png" /></a>
</div>
                    <span>
                        <a href="/wap/Products/Index?cid=1">阿里地区</a>
                    </span>
                </li>
            </ul>
        </div>
        <div class="hot">
            <div class="hot_left">
                <img src="/Areas/Wap/Content/img/push.png" />
                <span>
                    当季推荐
                </span>
            </div>
            <div class="hot_right">
                @{var push = ViewData["push"] as YTCMS.Domain.Entities.products;}
                 <span><a href="/wap/products/details?id=@push.Id" title="@push.Name">@push.Name.GetSubString(10, "")</a></span>
                 <span>￥@push.Price 起</span>
            </div>
        </div>
    </div>

    <!--特惠推荐--->
    <div class="push">
        <div class="favorable">
            <div class="push_title">
                <span>
                    特惠推荐
                </span>
            </div>
            <div class="push_body">
                <ul>
                    @{
                        var cid = Model.First(s => s.Code.Equals("WAPTHTJ")).Id;
                        foreach (var item2 in Model.First(s => s.Code.Equals("WAPTHTJ")).columnproducts.Where(s => s.Cid == cid).YTTake(3))
                        { 
                            <li>
                                <div>
                                    <a href="/Wap/products/details?id=@item2.products.Id"> <img src="@item2.products.Image.Replace("_120x120.jpg", "_194x124.jpg")" style="width:194px; height:124px;" /></a>
                                    <span><a href="/wap/products/details?id=@item2.products.Id" title="@item2.products.Name">@item2.products.Name.GetSubString(7, "")</a></span>
                                    <span>￥@item2.products.Price 起</span>
                                </div>
                            </li>
                        }
                    }
                    @*<li>
                        <div>
                            <img src="/Areas/Wap/Content/img/favorable.jpg" />
                            <span><a href="">拉萨6日游</a> </span>
                            <span>￥1288 起</span>
                        </div>
                    </li>
                    <li>
                        <div>
                            <img src="/Areas/Wap/Content/img/favorable.jpg" />
                            <span><a href="">拉萨6日游</a> </span>
                            <span>￥1288 起</span>
                        </div>
                    </li>
                    <li>
                        <div>
                            <img src="/Areas/Wap/Content/img/favorable.jpg" />
                            <span><a href="">拉萨6日游</a> </span>
                            <span>￥1288 起</span>
                        </div>
                    </li>*@
                </ul>
            </div>
        </div>
        <!---热门线路-->
        <div class="hotline">
            <div class="hotline_title">
                <span>
                    热门线路
                </span>
            </div>
            <div class="hotline_body" id="hotline">
                @{
                    var Rmxl = Model.First(s => s.Code.Equals("WAPRMXL")).Id;
                    foreach (var item2 in Model.First(s => s.Code.Equals("WAPRMXL")).columnproducts.Where(s => s.Cid == Rmxl).YTTake(6))
                    {
                        <div class="item">
                            <div class="hotline_body_left">
                                <a href="/Wap/products/details?id=@item2.products.Id"> <img src="@item2.products.Image.Replace("_120x120.jpg", "_194x124.jpg")" style="width:198px; height:105px;" /></a>
                            </div>
                            <div class="hotline_body_right">
                                <div class="title"><a href="/wap/products/details?id=@item2.products.Id">@item2.products.Name</a></div>
                                <div class="time"><span>最近期团:</span>@(string.IsNullOrEmpty(item2.products.Latest)?"暂无":item2.products.Latest)</div>
                                <div class="price">￥@item2.products.Price 起</div>
                            </div>
                        </div>
                    }
                }




                @*<div class="item">
                <div class="hotline_body_left">
                    <img src="/Areas/Wap/Content/img/h1.jpg" />
                </div>
                <div class="hotline_body_right">
                    <div class="title"><a>拉萨布达拉宫双日游</a></div>
                    <div class="time"><span>最近期团</span>2-17 </div>
                    <div class="price">￥1288 起</div>
                </div>
            </div>
            <div class="item">
                <div class="hotline_body_left">
                    <img src="/Areas/Wap/Content/img/h1.jpg" />
                </div>
                <div class="hotline_body_right">
                    <div class="title"><a>拉萨布达拉宫双日游</a></div>
                    <div class="time"><span>最近期团</span>2-17 </div>
                    <div class="price">￥1288 起</div>
                </div>
            </div>
            <div class="item">
                <div class="hotline_body_left">
                    <img src="/Areas/Wap/Content/img/h1.jpg" />
                </div>
                <div class="hotline_body_right">
                    <div class="title"><a>拉萨布达拉宫双日游</a></div>
                    <div class="time"><span>最近期团</span>2-17 </div>
                    <div class="price">￥1288 起</div>
                </div>
            </div>
            <div class="item">
                <div class="hotline_body_left">
                    <img src="/Areas/Wap/Content/img/h1.jpg" />
                </div>
                <div class="hotline_body_right">
                    <div class="title"><a>拉萨布达拉宫双日游</a></div>
                    <div class="time"><span>最近期团</span>2-17 </div>
                    <div class="price">￥1288 起</div>
                </div>
            </div>
            <div class="item">
                <div class="hotline_body_left">
                    <img src="/Areas/Wap/Content/img/h1.jpg" />
                </div>
                <div class="hotline_body_right">
                    <div class="title"><a>拉萨布达拉宫双日游</a></div>
                    <div class="time"><span>最近期团</span>2-17 </div>
                    <div class="price">￥1288 起</div>
                </div>
            </div>*@
            </div>
            <div class="hotline_bottom" id="Add">
                <span>点击加载更多</span>
            </div>
        </div>

        <!--底部--->
        <div class="bottom">
            <span><a rel="external" href="tel://02388721881" data-role="none">国内热线：023-8872 1881(点击拨打)</a></span>
            <span><a rel="external" href="tel://02388721886" data-role="none">出境热线：023-8872 1886(点击拨打)</a></span>
            <span> Copyright © 西藏集结号旅游服务有限公司</span>
        </div>
    </div>

    <div class="top_bar footer_bar">
        <nav>
            <ul class="top_menu">
                <li>
                    <a href="/wap/Home/Index">
                        <img src="/Areas/Wap/Content/img/home.png" />
                        首页
                    </a>
                </li>
                <li>
                    <img src="/Areas/Wap/Content/img/consult.png" />
                    点击咨询
                </li>
            </ul>
        </nav>
    </div>
</div>
@Html.Hidden("cid", Model.First().Id);

<script type="text/javascript">
    $('#carousel').carouFredSel({
        responsive: true,
        auto: true,
        width: 640,
        height: 218,
        //scroll: 2,
        pagination: "#pager",
        
    });
    $("#Add").click(function () {
        var top = 0
        $(".item").each(function(){
            top++;
        })
        var cid = $("#cid").val();
        if(parseInt(top)>=6)
        {
            $.post('/wap/home/Add', { cid: cid, top: top }, function (result) {
                $(".item:last").after(result);
            })
        }
    });
</script> 